/**
 * @file
 * @author  michal.nezerka@gmail.com
 * @brief   Application Frame Declaration
 */

#ifndef WWMAINWND_H
#define WWMAINWND_H

#include <wx/aui/aui.h>
#include <wx/dirctrl.h>
#include <wx/log.h>
#include <wx/textctrl.h>
#include <wx/treectrl.h>

#include "app.h"
#include "mapwnd.h"

namespace wildwood
{

class MainWnd: public wxFrame
{
public:
    void OpenFile(const wxString filePath);
    MainWnd(wxFrame *frame, const wxString& title);
    ~MainWnd();
    void addInfo(const wxString info);

private:
    MapWnd *mMapWnd;
    wxTextCtrl *mLogTextCtrl;
    wxTreeCtrl *mGpxTree;
    wxAuiManager m_auiMgr;

    void OnClose(wxCloseEvent& event);
    void OnQuit(wxCommandEvent& event);
    void OnPreferences(wxCommandEvent& event);
    void OnViewPane(wxCommandEvent& event);
    void OnGotoLatLon(wxCommandEvent& event);
    void OnGotoDefaultLoc(wxCommandEvent& event);
    void OnSetDefaultLoc(wxCommandEvent& event);
    void OnAbout(wxCommandEvent& event);
    void OnOpenDb(wxCommandEvent& event);
    void OnFileNewSong(wxCommandEvent& event);
    void OnFileOpenSong(wxCommandEvent& event);

    void updateGpxTree();
    wxAuiDockArt* GetDockArt() { return m_auiMgr.GetArtProvider(); };
    void DoUpdate() { m_auiMgr.Update(); };
    void OnEraseBackground(wxEraseEvent& event) { event.Skip(); };
    void OnSize(wxSizeEvent& event) { event.Skip(); };
    void OnPaneClose(wxAuiManagerEvent& evt);

    DECLARE_EVENT_TABLE()
};

} // namespace


#endif // WWMAINWND_H
